﻿@{
    ViewBag.Title = "Evaluate";
    Layout = null;
}

<!doctype html>
<html ng-app="app">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <title>订单评价</title>
    <link href="~/Content/Style/gobal.css" rel="stylesheet" type="text/css">
    <link href="~/Content/Style/evaluate.css" rel="stylesheet" type="text/css">
    <script src="~/Content/Script/angular.min.js"></script>
    <script src="~/Scripts/PageJs/Main.js"></script>
    <script src="~/Scripts/PageJs/Order.js"></script>

</head>

<body ng-controller="OrderDetailController">
    <div class="wrap">
        <form ng-submit="addEva(addEvaInfo)" id="addfrmRegist" class="form-horizontal">
            <div id="content">
                <div class="evaluate">
                    <span class="eval">整体评价</span>
                    @*<span class="eval_star">*@
                    <div class="star_little" id="star">
                        <ul>
                            <li ng-class="{'star1':isStar1}" ng-click="putstar(1)"></li>
                            <li ng-class="{'star2':isStar2}" ng-click="putstar(2)"></li>
                            <li ng-class="{'star3':isStar3}" ng-click="putstar(3)"></li>
                            <li ng-class="{'star4':isStar4}" ng-click="putstar(4)"></li>
                            <li ng-class="{'star5':isStar5}" ng-click="putstar(5)"></li>
                            <div class="clearfix"></div>
                        </ul>
                        <span></span>
                        <p></p>
                    </div>
                    <div class="clearfix"></div>
                </div>
                <!--<div class="quality">
                    <span class="qua">商品质量</span>
                    <span class="star_little">
                        <ul>
                            <li></li>
                            <li></li>
                            <li></li>
                            <li></li>
                            <li></li>
                            <div class="clearfix"></div>
                        </ul>
                    </span>
                    <div class="clearfix"></div>
                </div>
                <div class="serve">
                    <span class="ser">服务质量</span>
                    <span class="star_little">
                        <ul>
                            <li></li>
                            <li></li>
                            <li></li>
                            <li></li>
                            <li></li>
                            <div class="clearfix"></div>
                        </ul>
                    </span>
                    <div class="clearfix"></div>
                </div>-->
                <div>
                    <textarea ng-model="addEvaInfo.EvaTxt" name="" class="text" type="text" placeholder="您的意见很重要！口味如何？服务怎样？来点评一下吧！"></textarea>
                </div>
                <!--<div class="finish_time">
                    <p class="time_title">本次物流到达时间</p>
                    <p class="time">2015.12.21&nbsp;19:20</p>
                </div>-->
                <div class="recommend">
                    <a>推荐菜品</a>
                    <ul>
                        <li ng-repeat="item in EvaDishID" @*style="float: left; margin-right: 20px; font-size: 16px;"*@>
                            <label style="margin-bottom: 0; font-weight: 100;">
                                <input type="checkbox" style="margin-right: 5px;" id="{{item}}" name="{{EvaDishName[$index]}}" ng-checked="isSelected(item)" ng-click="updateSelection($event,item)" />
                                <span ng-bind="EvaDishName[$index]"></span>
                            </label>
                        </li>
                        <div class="clearfix"></div>
                    </ul>
                </div>
            </div>
            <div class="post_eval">
                <input id="btnSubmit" name="" type="submit" ng-disabled="myForm.$invalid" value="提交评价" class="buttom">
            </div>
        </form>
    </div>
    @*<script type="text/javascript">
        window.onload = function () {

            var oStar = document.getElementById("star");
            var aLi = oStar.getElementsByTagName("li");
            var oUl = oStar.getElementsByTagName("ul")[0];
            var oSpan = oStar.getElementsByTagName("span")[0];
            var oP = oStar.getElementsByTagName("p")[0];
            var i = iScore = iStar = 0;
            var aMsg = [
                        "很不满意|差得太离谱，与卖家描述的严重不符，非常不满",
                        "不满意|部分有破损，与卖家描述的不符，不满意",
                        "一般|质量一般，没有卖家描述的那么好",
                        "满意|质量不错，与卖家描述的基本一致，还是挺满意的",
                        "非常满意|质量非常好，与卖家描述的完全一致，非常满意"
            ]

            for (i = 1; i <= aLi.length; i++) {
                aLi[i - 1].index = i;

                //鼠标移过显示分数
                aLi[i - 1].onmouseover = function () {
                    fnPoint(this.index);
                    //浮动层显示
                    oP.style.display = "block";
                    //计算浮动层位置
                    oP.style.left = oUl.offsetLeft + this.index * this.offsetWidth - 20 + "px";
                    //匹配浮动层文字内容
                    //oP.innerHTML = "<em><b>" + this.index + "</b> 分 " + aMsg[this.index - 1].match(/(.+)\|/)[1] + "</em>"// + aMsg[this.index - 1].match(/\|(.+)/)[1]
                    oP.innerHTML = "<em><b>" + this.index + "</b> 分 " + aMsg[this.index - 1].match(/(.+)\|/)[1] + "</em>"// + aMsg[this.index - 1].match(/\|(.+)/)[1]
                };

                //鼠标离开后恢复上次评分
                aLi[i - 1].onmouseout = function () {
                    alert("aa");
                    fnPoint();
                    //关闭浮动层
                    oP.style.display = "none"
                };

                //点击后进行评分处理
                aLi[i - 1].onclick = function () {
                    alert("bb");
                    //alert(this.index);
                    iStar = this.index;
                    oP.style.display = "none";
                    oSpan.innerHTML = "<strong>" + (this.index) + " 分</strong> (" + aMsg[this.index - 1].match(/(.+)\|/)[1] + ")"
                }
            }

            //评分处理
            function fnPoint(iArg) {
                //分数赋值
                iScore = iArg || iStar;
                for (i = 0; i < aLi.length; i++) aLi[i].className = i < iScore ? "on" : "";
            }

        };
    </script>*@
</body>
</html>

